const webpack = require("webpack")

const path = require('path')
const resolve = dir => path.join(__dirname, dir);

module.exports = {
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin({
                $: "jquery",
                jQuery: "jquery",
                'windows.jQuery': "jquery"
            })
        ]
    },
    // 修改别名
    chainWebpack: config => {
        config.resolve.alias
             // .set('@', resolve('src'))
                      .set('assets', resolve('src/assets'))
                      .set('_c', resolve('src/components'))
                      .set('components', resolve('src/components'))
                      // .set('layout', resolve('src/layout'))
                      // .set('base', resolve('src/base'))
                      // .set('static', resolve('src/static'));
    }
        
} 